#ifndef XGE_GRAPHICS_G_COMMON_H_
#define XGE_GRAPHICS_G_COMMON_H_
#include "xge_common_config.h"
#include <Windows.h>

namespace xge{
namespace graphics{


  typedef DWORD color_t;
  typedef uint32_t channel_t;
  typedef int32_t chadiff_t;
  // Memory created usage 
  enum MemoryUsage {
    READ_WRITE_MEMORY , 
    READ_ONLY_MEMORY  ,
    WRITE_ONLY_MEMORY  // Dynamic 
  };
  // Locking option 
  enum LockOption {
    READ_ONLY_LOCK ,
    READ_WRITE_LOCK
  };
  // The supported primitive type
  enum PrimitiveType {
    PRIMITIVE_RECT ,
    PRIMITIVE_LINE 
  };
  // Blending type
  const int     BLEND_ADD = 1 ;
  const int     BLEND_MUL = 0 ;
  const int     BLEND_ALPHA = 2 ;
  const int     BLEND_ALPHA_MUL=0;
  const int     BLEND_ZBUFFER = 4;
  const int     BLEND_NOZBUFFER=0;
  const int     BLEND_DEFAULT= BLEND_ADD | BLEND_ALPHA | BLEND_NOZBUFFER ;
  const int     DUMMY_BLEND_VALUE= -1;
  // Vertex type
  struct Vertex {
    float x,y;
    float z;
    color_t color;
    float tx,ty;
  };
  class Texture;
  // Quad type
  struct Quad {
    Vertex vertex[4];
    Texture* texture;
    int blending_type;
  };

}
}


#endif// XGE_GRAPHICS_G_COMMON_H_